home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 37
/
Amiga Format CD37 (1999-02-16)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-03].iso
/
-screenplay-
/
shareware
/
invasionforce
/
source
/
misc
/
addcommas.rexx
next >
Wrap
OS/2 REXX Batch file
|
1999-01-09
|
515b
|
24 lines
/* AddCommas.rexx - add a comma to each line of a text file */
parse arg filename
if ~open('infile',filename,'r') then do
say "Sorry, can't read" filename "."
exit
end
call open('outfile',"T:OUTPUT",'w')
line=readln('infile')
do while ~eof('infile')
line=line","
call writeln('outfile',line)
line=readln('infile')
end
call close('infile')
call close('outfile')
address command "copy T:OUTPUT to" filename
address command "delete >nil: T:OUTPUT"
exit
/* end of listing */